const border = require('../tw-lib-base/border/props')
const padding = require('../tw-lib-base/padding/props')

module.exports = {
  data: {
    type: Array,
    default () {
      return {
        length: 0
      }
    },
    name: '数据长度',
    filedType: 'api'
  },
  bgcolor: {
    type: String,
    default: '',
    name: '背景色',
    filedType: 'color'
  },
  value: {
    type: Number,
    default: 1,
    name: '当前页页码',
    filedType: 'value'
  },

  pageSize: {
    type: Number,
    default: 10,
    name: '每次加载行数',
    filedType: 'string'
  },
  useCustFn: {
    type: Boolean,
    default: false,
    name: '使用自定义函数',
    filedType: 'switch'
  },
  custLoadFn: {
    type: Function,
    default: '',
    name: '加载函数',
    nameTip: '函数的第一个参数是页面this',
    filedType: 'function'
  },
  custRefreashFn: {
    type: Function,
    default: '',
    name: '刷新函数',
    nameTip: '函数的第一个参数是页面this',
    filedType: 'function'
  },

  ...border,
  ...padding
}
